public class carFactory {
    public static Car getCar(String brand, double price)
    {
        if("博越".equals(brand))
            return new Geely(brand, price);
        else if("红旗H5".equals(brand))
            return new redCar(brand, price);
        return null;
    }

}
